package com.groupbuying.admin.controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.groupbuying.admin.service.TokenService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @api {post} /admin/activeCheck
 * @apiExample
 * author zmlmagic
 * tar 用于检测该服务是否就绪
 * date 2019年10月29日
 * @apiGroup Admin
 * @apiVersion 1.0.0
 * @apiHeader {String} null 无
 * @apiParam {String} null 无
 * @apiSuccess {String} succeed 就绪
 */

@RestController
@RequestMapping
public class ActiveCheckController {
    private static final Logger logger = LoggerFactory.getLogger(ActiveCheckController.class);

    @Autowired
    private TokenService tokenService;

    @GetMapping("/activeCheck")
    @SentinelResource(value = "activeCheck")
    public String activeCheck() {
        logger.error("6");
        return "6";
    }
}
